package com.mall.vo;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * @Description
 * @ClassName registryUserVo
 * @Author cxx
 * @Date 2023/6/10 9:59
 * @Version 1.0
 */
@Data
public class RegistryUserVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * 用户名
     */

    private String username;
    /**
     * 用户真实名
     */

    private String trueName;
    /**
     * 密码
     */

    private String password;


    /**
     * 性别 传0或1 0女1男
     */

    private Integer sex;

    /**
     * 电话
     */
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    @NotNull

    private String phone;

    /**
     * 邮箱
     */
    @Email(message = "邮箱格式不正确")

    private String email;
    /**
     * 短信验证码
     */
    private String smsCode;
}
